package com.mpq.utils;

import lombok.Data;

/**
 * @author mingpingqiang on 2018/11/29/15:34
 * Created by mingpingqiang on 2018/11/29/15:34
 */
@Data
public class MyException extends RuntimeException{
    private String msg;
    private int code;

    public MyException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public MyException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public MyException(String msg, int code) {
        super(msg);
        this.msg = msg;
        this.code = 500;
        this.code = code;
    }

    public MyException(String msg, int code, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }
}
